IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'spTreleasereason_Create')
	BEGIN
		PRINT 'Dropping Procedure spTreleasereason_Create'
		DROP  Procedure  spTreleasereason_Create
	END

GO

PRINT 'Creating Procedure spTreleasereason_Create'
GO
CREATE Procedure dbo.spTreleasereason_Create
	( 	  
	  @releasereason varchar(200), 
		@description varchar(100), 
		@active bit
	)
AS
  /* 
    ------------------------------------------------------------------------------
    - Change History
    - --------------
    - Date          Description
    ------------------------------------------------------------------------------
    - 8/23/2007    Initial version created
    ------------------------------------------------------------------------------
  */

	-- Declare the required variables

	-- Create the required new record
	INSERT INTO Treleasereason
	  (
		releasereason,
			description,
			active	  
	  )
	VALUES
	  (
		@releasereason,
			@description,
			@active
	  )

	-- Handle any errors
	IF @@ERROR != 0
	BEGIN
		RAISERROR('spTreleasereason_Create: Unable to Insert a new Treleasereason', 10, 1)
		RETURN
	END

	-- Return the newly created ID
	SELECT	@@IDENTITY AS 'Treleasereason_ID'

	-- Return to calling method
	RETURN 

GO
